﻿<Application x:Class="FileListViewTest.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             StartupUri="MainWindow.xaml"
             
             xmlns:EditInPlace="clr-namespace:InplaceEditBoxLib.Views;assembly=InplaceEditBoxLib"
             >
    <Application.Resources>
    <ResourceDictionary>
      <ResourceDictionary.MergedDictionaries>

        <ResourceDictionary Source="/UserNotification;component/Themes/LightBrush.xaml" />

        <!-- ResourceDictionary Source="/FileListView;component/Themes/Generic.xaml" / -->

        <ResourceDictionary Source="/FileListView;component/Images/GenericIcons.xaml" />
        <!-- ResourceDictionary Source="/FileListView;component/Images/MetroDarkIcons.xaml" / -->
        <!-- ResourceDictionary Source="/FileListView;component/Images/MetroLightIcons.xaml" / -->

        <ResourceDictionary Source="/FolderBrowser;component/Images/GenericIcons.xaml" />
        <!-- ResourceDictionary Source="/FolderBrowser;component/Images/MetroDarkIcons.xaml" / -->
        <!-- ResourceDictionary Source="/FolderBrowser;component/Images/MetroLightIcons.xaml" / -->

      </ResourceDictionary.MergedDictionaries>

      <SolidColorBrush x:Key="HyperlinkForeground" Color="Black" />

      <SolidColorBrush x:Key="HyperlinkForegroundDisabled" Color="Gray" />

      <!-- Visibale part of InPlace Edit Control when Editing is turned off -->
      <!-- Style TargetType="{x:Type EditInPlace:EditBox}" >
        <Setter Property="HorizontalAlignment" Value="Left"  />
        <Setter Property="VerticalAlignment"   Value="Center" />
        <Setter Property="Background" Value="Black" />
        <Setter Property="Template">
          <Setter.Value>
            <ControlTemplate TargetType="{x:Type EditInPlace:EditBox}">
              <Grid>
                <TextBlock x:Name="PART_TextBlock" MinWidth="10"
                             Width="Auto"
                             Grid.Column="1"
                             SnapsToDevicePixels="True"
                             ToolTipService.IsEnabled="True"
                             ToolTip="{Binding DisplayName}"
                             >
                      <Hyperlink Command="{Binding Path=Data.NavigateDownCommand, Source={StaticResource DataContextProxy}}"
                                 CommandParameter="{Binding .}">
                        <Hyperlink.Style>
                          - Change resource to show underline on mouseover only -
                          <Style TargetType="{x:Type Hyperlink}">
                            <Style.Triggers>
                              <Trigger Property="IsMouseOver"      Value="true">
                                <Setter Property="TextDecorations" Value="Underline" />
                                <Setter Property="Foreground"      Value="{DynamicResource HyperlinkForeground}" />
                              </Trigger>
                              <Trigger Property="IsEnabled"   Value="false">
                                <Setter Property="Foreground" Value="{DynamicResource HyperlinkForegroundDisabled}" />
                              </Trigger>
                              <Trigger Property="IsEnabled" Value="true">
                                <Setter Property="Cursor"   Value="Hand" />
                              </Trigger>
                            </Style.Triggers>
                            <Setter Property="TextBlock.TextDecorations" Value="{x:Null}" />
                            <Setter Property="Foreground"                Value="{DynamicResource HyperlinkForeground}" />
                          </Style>
                        </Hyperlink.Style>
                        <TextBlock Text="{Binding DisplayName}"/>
                      </Hyperlink>
                    </TextBlock>

                - The measurment textblock is never visible it's simply there to tell the length of a string to the textbox -
                <TextBlock x:Name="PART_MeasureTextBlock" MinWidth="10"
                               HorizontalAlignment="Left"
                               VerticalAlignment="Center"
                               Visibility="Hidden"
                       />
              </Grid>
            </ControlTemplate>
          </Setter.Value>
        </Setter>
      </Style -->

    </ResourceDictionary>

  </Application.Resources>
</Application>
